\(\int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+a \sin (c+d x)} \, dx\) [538]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 60 \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\csc (c+d x)}{a d}-\frac {\csc ^2(c+d x)}{2 a d}-\frac {\log (\sin (c+d x))}{a d}+\frac {\sin (c+d x)}{a d} \]

[Out]

csc(d*x+c)/a/d-1/2*csc(d*x+c)^2/a/d-ln(sin(d*x+c))/a/d+sin(d*x+c)/a/d

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2915, 12, 76} \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\sin (c+d x)}{a d}-\frac {\csc ^2(c+d x)}{2 a d}+\frac {\csc (c+d x)}{a d}-\frac {\log (\sin (c+d x))}{a d} \]

[In]

Int[(Cos[c + d*x]^2*Cot[c + d*x]^3)/(a + a*Sin[c + d*x]),x]

[Out]

Csc[c + d*x]/(a*d) - Csc[c + d*x]^2/(2*a*d) - Log[Sin[c + d*x]]/(a*d) + Sin[c + d*x]/(a*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 76

Int[((d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_))*((e_) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*
x)*(d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && IGtQ[p, 0] && EqQ[b*e + a*f, 0] &&  !(ILtQ[n
 + p + 2, 0] && GtQ[n + 2*p, 0])

Rule 2915

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {a^3 (a-x)^2 (a+x)}{x^3} \, dx,x,a \sin (c+d x)\right )}{a^5 d} \\ & = \frac {\text {Subst}\left (\int \frac {(a-x)^2 (a+x)}{x^3} \, dx,x,a \sin (c+d x)\right )}{a^2 d} \\ & = \frac {\text {Subst}\left (\int \left (1+\frac {a^3}{x^3}-\frac {a^2}{x^2}-\frac {a}{x}\right ) \, dx,x,a \sin (c+d x)\right )}{a^2 d} \\ & = \frac {\csc (c+d x)}{a d}-\frac {\csc ^2(c+d x)}{2 a d}-\frac {\log (\sin (c+d x))}{a d}+\frac {\sin (c+d x)}{a d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.77 \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {2 \csc (c+d x)-\csc ^2(c+d x)-2 \log (\sin (c+d x))+2 \sin (c+d x)}{2 a d} \]

[In]

Integrate[(Cos[c + d*x]^2*Cot[c + d*x]^3)/(a + a*Sin[c + d*x]),x]

[Out]

(2*Csc[c + d*x] - Csc[c + d*x]^2 - 2*Log[Sin[c + d*x]] + 2*Sin[c + d*x])/(2*a*d)

Maple [A] (verified)

Time = 0.25 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.70

method result size
derivativedivides \(\frac {\sin \left (d x +c \right )-\frac {1}{2 \sin \left (d x +c \right )^{2}}-\ln \left (\sin \left (d x +c \right )\right )+\frac {1}{\sin \left (d x +c \right )}}{d a}\) \(42\)
default \(\frac {\sin \left (d x +c \right )-\frac {1}{2 \sin \left (d x +c \right )^{2}}-\ln \left (\sin \left (d x +c \right )\right )+\frac {1}{\sin \left (d x +c \right )}}{d a}\) \(42\)
parallelrisch \(\frac {8 \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-8 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-8 \cos \left (d x +c \right )+8\right ) \cot \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-\left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3\right ) \left (\csc ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+4 \sec \left (\frac {d x}{2}+\frac {c}{2}\right ) \csc \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d a}\) \(116\)
risch \(\frac {i x}{a}-\frac {i {\mathrm e}^{i \left (d x +c \right )}}{2 d a}+\frac {i {\mathrm e}^{-i \left (d x +c \right )}}{2 d a}+\frac {2 i c}{a d}+\frac {2 i \left (-i {\mathrm e}^{2 i \left (d x +c \right )}+{\mathrm e}^{3 i \left (d x +c \right )}-{\mathrm e}^{i \left (d x +c \right )}\right )}{a d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d a}\) \(130\)
norman \(\frac {\frac {3 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}+\frac {3 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {1}{8 a d}+\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d a}+\frac {3 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d a}-\frac {\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d a}+\frac {11 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d a}+\frac {11 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d a}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}\) \(221\)

[In]

int(cos(d*x+c)^5*csc(d*x+c)^3/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d/a*(sin(d*x+c)-1/2/sin(d*x+c)^2-ln(sin(d*x+c))+1/sin(d*x+c))

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.02 \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {2 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 2 \, {\left (\cos \left (d x + c\right )^{2} - 2\right )} \sin \left (d x + c\right ) - 1}{2 \, {\left (a d \cos \left (d x + c\right )^{2} - a d\right )}} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)^3/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/2*(2*(cos(d*x + c)^2 - 1)*log(1/2*sin(d*x + c)) - 2*(cos(d*x + c)^2 - 2)*sin(d*x + c) - 1)/(a*d*cos(d*x + c
)^2 - a*d)

Sympy [F(-1)]

Timed out. \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+a \sin (c+d x)} \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**5*csc(d*x+c)**3/(a+a*sin(d*x+c)),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.87 \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {2 \, \log \left (\sin \left (d x + c\right )\right )}{a} - \frac {2 \, \sin \left (d x + c\right )}{a} - \frac {2 \, \sin \left (d x + c\right ) - 1}{a \sin \left (d x + c\right )^{2}}}{2 \, d} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)^3/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/2*(2*log(sin(d*x + c))/a - 2*sin(d*x + c)/a - (2*sin(d*x + c) - 1)/(a*sin(d*x + c)^2))/d

Giac [A] (verification not implemented)

none

Time = 0.43 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.05 \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {2 \, \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a} - \frac {2 \, \sin \left (d x + c\right )}{a} - \frac {3 \, \sin \left (d x + c\right )^{2} + 2 \, \sin \left (d x + c\right ) - 1}{a \sin \left (d x + c\right )^{2}}}{2 \, d} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)^3/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/2*(2*log(abs(sin(d*x + c)))/a - 2*sin(d*x + c)/a - (3*sin(d*x + c)^2 + 2*sin(d*x + c) - 1)/(a*sin(d*x + c)^
2))/d

Mupad [B] (verification not implemented)

Time = 10.40 (sec) , antiderivative size = 150, normalized size of antiderivative = 2.50 \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {1}{2}}{d\,\left (4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,d}+\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{a\,d} \]

[In]

int(cos(c + d*x)^5/(sin(c + d*x)^3*(a + a*sin(c + d*x))),x)

[Out]

(2*tan(c/2 + (d*x)/2) - tan(c/2 + (d*x)/2)^2/2 + 10*tan(c/2 + (d*x)/2)^3 - 1/2)/(d*(4*a*tan(c/2 + (d*x)/2)^2 +
 4*a*tan(c/2 + (d*x)/2)^4)) - log(tan(c/2 + (d*x)/2))/(a*d) - tan(c/2 + (d*x)/2)^2/(8*a*d) + tan(c/2 + (d*x)/2
)/(2*a*d) + log(tan(c/2 + (d*x)/2)^2 + 1)/(a*d)